home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_a_d / diskroot.zip / STFSETUP.IN_ < prev    next >
Text File  |  1992-03-12  |  13KB  |  421 lines

  1. ;
  2. ; Setup script for the Windows Resource Kit for the 
  3. ; Microsoft Windows Operating System version 3.1
  4. ; Copyright (c) Microsoft Corp. 1992
  5. ;
  6.  
  7. [Shell Commands]
  8.  
  9.         read-syms  "General Variables"
  10.         set-title  $(PACKAGETITLE)
  11.  
  12.         detect     "Detect Variables"
  13.  
  14. welcome = read-syms  "Welcome Variables"
  15.  
  16.         ui  start  INFO3
  17.  
  18.         ui  pop    1
  19.  
  20.         ifstr      $(DLGEVENT) == "CONTINUE"
  21.             ; fall through
  22.         else   ;;  $(DLGEVENT) == "EXIT"
  23.             set  CurrentDialog = "welcome"
  24.             goto "quit"
  25.         endif
  26.  
  27.  
  28. get-dest = read-syms  "Get Dest Variables"
  29.  
  30.         set GetPTitle  = $(PACKAGETITLE)
  31.  
  32.         set EditTextIn = $(DEST)
  33.         set EditFocus  = "END"
  34.  
  35.         ui  start  GETPATH
  36.  
  37.         ifstr      $(DLGEVENT) == "CONTINUE"
  38.             ui pop 1
  39.         else-ifstr $(DLGEVENT) == "BACK"
  40.             ui pop 1
  41.             goto "welcome"
  42.         else   ;;  $(DLGEVENT) == "EXIT"
  43.             set  CurrentDialog = "get-dest"
  44.             goto "quit"
  45.         endif
  46.  
  47.         set  DEST  = $(EditTextOut)
  48.         set  DEST+ = $(EditPathOut)
  49.  
  50. check-disk-space = install "Check Disk Space"
  51.         ifint $(ADDITIONALNEEDED) > 0
  52.             goto "Insufficient-Disk"
  53.         else
  54.             goto "Check-Directory"
  55.         endif
  56.  
  57. Check-Directory =+
  58.         set DIREXIST = $(DEST)
  59.         detect "Dir Exist Test"
  60.  
  61.         ifstr $(DIREXISTRESULT) == "NO"
  62.             goto "Dir-Create-Prompt"
  63.         else
  64.             goto "Check-Prev-Install"
  65.         endif
  66.  
  67. Dir-Create-Prompt = read-syms "Dir Create Prompt Variables"
  68.  
  69.         set InfoTitle  = $(PACKAGETITLE)
  70.  
  71.         ui  start  INFO3
  72.         ui  pop    1
  73.  
  74.         ifstr      $(DLGEVENT) == "CONTINUE"
  75.             goto "Make-Dest-Dir"
  76.         else-ifstr $(DLGEVENT) == "BACK"
  77.             goto "get-dest"
  78.         else   ;;  $(DLGEVENT) == "EXIT"
  79.             set  CurrentDialog = "Dir-Create-Prompt"
  80.             goto "quit"
  81.         endif
  82.  
  83. Make-Dest-Dir = install "Make Dest Dir"
  84.         
  85.         ifstr $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  86.             goto "Make-Dir-Failure"
  87.         else
  88.             goto "Check-For-VBRun"
  89.         endif
  90.  
  91. Check-Prev-Install =+
  92.         set FILEEXIST = $(DEST+)"bmpview.exe"
  93.  
  94.         detect "File Exist Test"
  95.         
  96.         ifstr $(FILEEXISTRESULT) == "YES"
  97.             goto "Prev-Install-Found"
  98.         else
  99.             goto "Check-For-VBRun"
  100.         endif
  101.  
  102.  
  103. Check-For-VBRun =+
  104.         set DOVBRUN = "YES"
  105.         ; we look for vbrun100.dll in both the sysdir
  106.         ; and the windir.  if it is not in either then
  107.         ; we copy it to the sysdir if that is a local
  108.         ; disk or the windir if it is not. 
  109.         set FILEEXIST = $(WinDir)"tophook.dll" 
  110.         detect "File Exist Test" 
  111.  
  112.         ifstr $(FILEEXISTRESULT) == "YES" 
  113.             set DOPROGMAN = "NO" 
  114.         endif 
  115.  
  116.         set FILEEXIST = $(WinDir)"vbrun100.dll" 
  117.         detect "File Exist Test" 
  118.  
  119.         ifstr $(FILEEXISTRESULT) == "YES"
  120.             set DOVBRUN = "NO"
  121.             goto "install"
  122.         endif
  123.  
  124.         set FILEEXIST = $(SysDir)"vbrun100.dll"
  125.         detect "File Exist Test"
  126.  
  127.         ifstr $(FILEEXISTRESULT) == "YES"
  128.             set DOVBRUN = "NO"
  129.             goto "install"
  130.         endif
  131.         
  132.         ; if we get here then we could not find vbrun100.dll.
  133.         ; figure out where it should go.
  134.  
  135.         set NETDRIVE = $(SysDir)"vbrun100.dll"
  136.         detect "Is NetDrive Test"
  137.  
  138.         ifstr $(ISNETDRIVE) == "YES"
  139.             set VBRUNDEST = $(WinDir)
  140.         else
  141.             set VBRUNDEST = $(SysDir)
  142.         endif
  143.         
  144.         goto "install"
  145.  
  146. Insufficient-Disk =  read-syms "Insufficient Disk Variables"
  147.     
  148.         set InfoTitle  = $(PACKAGETITLE)
  149.  
  150.         ui  start  INFO3
  151.         ui  pop    1
  152.  
  153.         ifstr      $(DLGEVENT) == "CONTINUE"
  154.             goto "get-dest"
  155.         else   ;;  $(DLGEVENT) == "EXIT"
  156.             set  CurrentDialog = "Insufficient-Disk"
  157.             goto "quit"
  158.         endif
  159.  
  160. Make-Dir-Failure = read-syms "Make Dir Failure Variables"
  161.  
  162.         set InfoTitle  = $(PACKAGETITLE)
  163.  
  164.         ui  start  INFO3
  165.         ui  pop    1
  166.  
  167.         ifstr      $(DLGEVENT) == "CONTINUE"
  168.             goto "get-dest"
  169.         else   ;;  $(DLGEVENT) == "EXIT"
  170.             set  CurrentDialog = "Make-Dir-Failure"
  171.             goto "quit"
  172.         endif
  173.  
  174. Prev-Install-Found = read-syms "Prev Install Found Variables"
  175.         set InfoTitle  = $(PACKAGETITLE)
  176.  
  177.         ui  start  INFO3
  178.         ui  pop    1
  179.  
  180.         ifstr      $(DLGEVENT) == "CONTINUE"
  181.             Set DOPROGMAN = "NO"
  182.             goto "Check-For-VBRun"
  183.         else-ifstr $(DLGEVENT) == "BACK"
  184.             goto "get-dest"
  185.         else   ;;  $(DLGEVENT) == "EXIT"
  186.             set  CurrentDialog = "Prev-Install-Found"
  187.             goto "quit"
  188.         endif
  189.  
  190. install = install  "Install Script"
  191.  
  192.         ifstr      $(STF_INSTALL_OUTCOME) == "STF_SUCCESS"
  193.             read-syms  "Exit-Success Message Variables"
  194.         else-ifstr $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  195.             read-syms  "Exit-UserQuit Message Variables"
  196.         else   ;;  $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  197.             read-syms  "Exit-Failure Message Variables"
  198.         endif
  199.  
  200.         ui start INFO1
  201.         ui pop 1
  202.         exit
  203.  
  204. quit  = ui  start  QUIT
  205.  
  206.         ifstr(i) $(DLGEVENT) == "CONTINUE"
  207.             ui   pop 1
  208.             goto $(CurrentDialog)
  209.         else
  210.             exit
  211.         endif
  212.  
  213. [Source Media Descriptions]
  214.     1 = "Windows Resource Kit Disk", TAGFILE = bmpview.ex$
  215.  
  216. [WRK Files]
  217.     ; in Check-Prev-Install one of these files needs to be added as the
  218.     ; file name for which to check.
  219.     1, BMPVIEW.EX$, DATE=$(DATESTR), RENAME=BMPVIEW.EXE, SIZE=147340
  220.     1, 31README.WR$, DATE=$(DATESTR), RENAME=31README.WRI, SIZE=99584
  221.     1, 3270.WR$, DATE=$(DATESTR), RENAME=3270.WRI, SIZE=15360
  222.     1, COMMQA.WR$, DATE=$(DATESTR), RENAME=COMMQA.WRI, SIZE=29952
  223.     1, LAYOUTS.WR$, DATE=$(DATESTR), RENAME=LAYOUTS.WRI, SIZE=36096
  224.     1, MOUSEQA.WR$, DATE=$(DATESTR), RENAME=MOUSEQA.WRI, SIZE=46208
  225.     1, NETAPP.EX$, DATE=$(DATESTR), RENAME=NETAPP.EXE, SIZE=45059
  226.     1, NETWORKS.WR$, DATE=$(DATESTR), RENAME=NETWORKS.WRI, SIZE=68096
  227.     1, PRINTERS.WR$, DATE=$(DATESTR), RENAME=PRINTERS.WRI, SIZE=44928
  228.     1, README.WR$, DATE=$(DATESTR), RENAME=README.WRI, SIZE=24576
  229.     1, SMARTMON.EX$, DATE=$(DATESTR), RENAME=SMARTMON.EXE, SIZE=28160
  230.     1, SMARTMON.HL$, DATE=$(DATESTR), RENAME=SMARTMON.HLP, SIZE=11550
  231.     1, SYSINI.WR$, DATE=$(DATESTR), RENAME=SYSINI.WRI, SIZE=198912
  232.     1, SYSMETER.EX$, DATE=$(DATESTR), RENAME=SYSMETER.EXE, SIZE=36660
  233.     1, SYSMETER.HL$, DATE=$(DATESTR), RENAME=SYSMETER.HLP, SIZE=16395
  234.     1, T2HINTS.WR$, DATE=$(DATESTR), RENAME=T2HINTS.WRI, SIZE=7808
  235.     1, TD_TUTOR.EX$, DATE=$(DATESTR), RENAME=TD_TUTOR.EXE, SIZE=352896
  236.     1, TOPDESK.EX$, DATE=$(DATESTR), RENAME=TOPDESK.EXE, SIZE=77176
  237.     1, TOPDESK.HL$, DATE=$(DATESTR), RENAME=TOPDESK.HLP, SIZE=26922
  238.     1, VIDEOQA.WR$, DATE=$(DATESTR), RENAME=VIDEOQA.WRI, SIZE=30336
  239.     1, WININI.WR$, DATE=$(DATESTR), RENAME=WININI.WRI, SIZE=129152
  240.  
  241. [VBRun Files]
  242.     1, VBRUN100.DL$, DATE=$(DATESTR), RENAME=VBRUN100.DLL, SIZE=271264
  243.  
  244. [File Size Files]
  245.     1, FILESIZE.DL$, DATE=$(DATESTR), RENAME=FILESIZE.DLL, SIZE=12448
  246.     1, TOPHOOK.DL$, DATE=$(DATESTR), RENAME=TOPHOOK.DLL, SIZE=8697
  247.  
  248. [Check Disk Space]
  249.     AddSectionFilesToCopyList "WRK Files" $(STF_SRCDIR) $(DEST)
  250.     AddSectionFilesToCopyList "File Size Files" $(STF_SRCDIR) $(WinDir)
  251.     ; we can use the windir as the dest for the check because
  252.     ; we will only copy to our disk if local, and even if it
  253.     ; ends up going in the sysdir that will only happen if the
  254.     ; sysdir is a subdir of the windir.
  255.     AddSectionFilesToCopyList "VBRun Files" $(STF_SRCDIR) $(WinDir)
  256.     SetupGetCopyListCost FREEPERDISK CLPERDISK TOTALFREE
  257.     ; This will set ADDITIONAL NEEDED to the amnt missing if not enough.
  258.     set EXTRACOSTS = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
  259.     GetCopyListCost ADDITIONALNEEDED TOTALFREE TOTALNEEDED FREEPERDISK CLUSTERS +
  260.             TROUBLEPAIRS NEEDEDPERDISK EXTRACOSTS
  261.     ClearCopyList
  262.  
  263.     exit
  264.  
  265. [Make Dest Dir]
  266.     CreateDir $(DEST)
  267.     exit
  268.  
  269. [Install Script]
  270.     AddSectionFilesToCopyList "WRK Files" $(STF_SRCDIR)"WRK" $(DEST)
  271.     AddSectionFilesToCopyList "File Size Files" $(STF_SRCDIR)"WRK" $(WinDir)
  272.     ifstr $(DOVBRUN) == "YES"
  273.         AddSectionFilesToCopyList "VBRun Files" $(STF_SRCDIR)"WRK" $(VBRUNDEST)
  274.     endif
  275.  
  276.     CopyFilesInCopyList
  277.     ClearCopyList
  278.     ifstr $(DOPROGMAN) != "NO"
  279.         ; add the program group and contents.
  280.         CreateProgManGroup "Windows Resource Kit" ""
  281.         ShowProgManGroup   "Windows Resource Kit" 1
  282.         CreateProgManItem  "Windows Resource Kit" "Graphics Viewer" $(DEST+)"bmpview.exe"
  283.         CreateProgManItem  "Windows Resource Kit" "Network Assistant" $(DEST+)"netapp.exe"
  284.         CreateProgManItem  "Windows Resource Kit" "SMARTDrive Monitor" $(DEST+)"smartmon.exe"
  285.         CreateProgManItem  "Windows Resource Kit" "System Resource Monitor" $(DEST+)"sysmeter.exe"
  286.         CreateProgManItem  "Windows Resource Kit" "TopDesk" $(DEST+)"topdesk.exe"
  287.         CreateProgManItem  "Windows Resource Kit" "TopDesk Tour" $(DEST+)"td_tutor.exe"
  288.         CreateProgManItem  "Windows Resource Kit" "Read Me" $(DEST+)"readme.wri" 
  289.     endif
  290.         
  291.     ; setup the file size extension.
  292.     set INI = $(WinDir)"winfile.ini"
  293.     CreateIniKeyValue  $(INI) "AddOns" "File Size Extension" $(WinDir)"FILESIZE.DLL" O
  294.  
  295.     exit
  296.  
  297. [General Variables]
  298.     DATESTR       = 1992-04-06
  299.     ContBut    = "&Continue"
  300.     ExitBut    = "E&xit"
  301.     BackBut    = "&Back"
  302.     HelpBut    = "&Help"
  303.     
  304.     PACKAGETITLE = "Windows Resource Kit"
  305.     HelpTitle  = "Windows Resource Kit Setup Help"
  306.     HContBut   = "&OK"
  307.  
  308.     QuitTitle  = "Exit Resource Kit Setup"
  309.     QuitText1  = "\nThe Setup process is not complete.  If you exit now, 
  310.             the Windows Resource Kit software may not be completely installed."
  311.     QContBut   = "&Resume"
  312.     QExitBut   = "E&xit"
  313.  
  314.     GetPLabel  = "&Path:"
  315.     GetPathMessBoxTitle = "Windows Resource Kit Path Error"
  316.     GetPathMessBoxText  = "The path you entered is not a valid pathname."
  317.  
  318.     DEST       = C:\\WRK    ;; default for destination dir
  319.     DEST+      = C:\\WRK\\  ;; synchronized with $(DEST) but ends in slash
  320.  
  321. [Detect Variables]
  322.     WinDir = "C:\WINDOWS\" ? DETCMD.DLL,GetWindowsDir
  323.     SysDir = "C:\WINDOWS\SYSTEM\" ? DETCMD.DLL, GetWindowsSysDir
  324.     WinVer = {3,10} ? DETCMD.DLL, GetWindowsVersion
  325.  
  326. [File Exist Test]
  327.     FILEEXISTRESULT = "NO" ? DETCMD.DLL, DoesFileExist $(FILEEXIST)
  328.  
  329. [Dir Exist Test]
  330.     DIREXISTRESULT = "NO" ? DETCMD.DLL, DoesDirExist $(DIREXIST)
  331.  
  332. [Is NetDrive Test]
  333.     ISNETDRIVE = "NO" ? DETCMD.DLL, IsDriveANetwork $(NETDRIVE)
  334.  
  335. [Search EnvVar]
  336.     ENVSEARCHRESULT = "" ? DETCMD.DLL, FindTargetOnEnvVar $(SEARCHFILE) $(SEARCHPATH)
  337.  
  338. [Welcome Variables]
  339.     InfoTitle  = "Windows Resource Kit Welcome"
  340.     InfoText1  = "Welcome to the Microsoft Windows Resource Kit. 
  341.             \n\nThis setup program installs the Windows Resource Kit software 
  342.             on your machine.  
  343.             \n\n\nPress Continue to begin the setup process,\nor Exit to Quit."
  344.     HelpText1  = "\n\nThis program will install the Windows Resource Kit on a drive and 
  345.             directory of your choosing."
  346.     STF_BACK_ENABLED = "NO"
  347.  
  348. [Get Dest Variables]
  349.     GetPText1  = "Setup will copy the Windows Resource Kit software to the 
  350.             following directory:"
  351.     GetPText2  = "Choose Continue to accept this directory, or change the directory to the 
  352.             location that you prefer and then choose Continue."
  353.     HelpText1  = "Specifiy the Drive and Directory where you wish to copy 
  354.             the Windows Resource Kit.  For instance, if you want to 
  355.             put the files on your D drive in the WRK directory, enter 
  356.             D:\WRK."
  357.     STF_BACK_ENABLED = "NO"
  358.  
  359. [Dir Create Prompt Variables]
  360.     InfoText1  = "\n\nThe directory you selected does not currently exist. 
  361.             Choose Continue to create the directory, or Back to 
  362.             select a new directory."
  363.     HelpText1  = "If the directory you entered is correct, choose Continue 
  364.             to complete setup.  If you wish to change this directory 
  365.             choose Back to return to the prompt."
  366.     STF_BACK_ENABLED = "YES"
  367.  
  368. [Insufficient Disk Variables]
  369.     InfoText1  = "The disk you selected does not have enough space for 
  370.             the software.  
  371.             The Windows Resource Kit requires 1.5 MB free on 
  372.             your destination drive and 550K free on your Windows drive.   
  373.             \n\nChoose Continue to select a different path, or 
  374.             Exit to quit setup."
  375.     HelpText1  = "If you have another drive, choose CONTINUE and specify a directory 
  376.             on that drive.  If setup still fails, verify you have at least 
  377.             550K free on the drive where Windows is installed."
  378.     STF_BACK_ENABLED = "NO"
  379.  
  380. [Make Dir Failure Variables]
  381.     InfoText1  = "Setup was unable to create the specified directory. 
  382.             \n\nChoose Continue to select a different path, or 
  383.             Exit to quit setup."
  384.     HelpText1  = "Help text for the Make Dir Failure Dlg."
  385.     STF_BACK_ENABLED = "NO"
  386.  
  387. [Prev Install Found Variables]
  388.     InfoTitle  = $(PACKAGETITLE)
  389.     InfoText1  = "Setup has detected a previous installation of this software 
  390.             at the specified location. 
  391.             \n\nChoose Continue to overwrite the existing installation, 
  392.             or Back to select a different path."
  393.     HelpText1  = "If you wish to overwrite the files on your harddisk with the 
  394.             files included on the floppy disk, choose CONTINUE.  If you 
  395.             do not wish to overwrite these files, choose BACK to change 
  396.             the directory."
  397.     STF_BACK_ENABLED = "YES"
  398.  
  399. [Exit-Success Message Variables]
  400.     InfoTitle  = "Windows Resource Kit Setup Complete"
  401.     InfoText1  = "\n\nWindows Resource Kit Setup has completed.  To use the 
  402.             Utilities, open the Windows Resource Kit group in Program 
  403.             Manager and double-click the icon representing the utility 
  404.             you wish to use."
  405.     ContBut    = "E&xit"
  406.     STF_BACK_ENABLED = "NO"
  407.  
  408. [Exit-UserQuit Message Variables]
  409.     InfoTitle  = $(QuitTitle)
  410.     InfoText1  = "\nThe Windows Resource Kit has not been properly installed.  
  411.             You should allow the Setup program to run to completion 
  412.             to properly install the Windows Resource Kit software."
  413.     ContBut    = "E&xit"
  414.     STF_BACK_ENABLED = "NO"
  415.  
  416. [Exit-Failure Message Variables]
  417.     InfoTitle  = "Windows Resource Kit Setup Error"
  418.     InfoText1  = "\n\nWindows Resource Kit Setup has failed!"
  419.     ContBut    = "E&xit"
  420.     STF_BACK_ENABLED = "NO"
  421.